package web

import (
	"gitee.com/xgotool/sqlite-logs-more/service/logs"
	"gitee.com/xgotool/sqlite-logs-more/service/rootdb"
	"gitee.com/xiaoyutab/xgotool/xgin"
	"github.com/gin-gonic/gin"
)

// 获取设备详情信息
//
//	GET	dervice.list
func DerviceList(c *gin.Context) *xgin.Response {
	// 获取设备详情信息
	der, err := rootdb.DerviceList()
	if err != nil {
		return xgin.Resp().Error(err)
	}
	logs.Connect()
	return xgin.Resp().NoPage(c, der, len(der))
}
